import { $post, $$post } from '@/utils/request';

export interface LoginData {
  username: string;
  password: string;
}

export interface LoginRes {
  token: string;
}
export function login(data: LoginData) {
  return $post('/admin/login', data);
}

// 获取权限菜单
export function getUserPermissions(data: any) {
  return $post('/system/query/queryMenu', data);
}
// export function logout() {
//   return $$post('/api/user/logout');
// }

// export function getUserInfo() {
//   return $$post('/api/user/info');
// }

export function getMenuList() {
  return $$post('/api/user/menu');
}

export function changePassword(data: any) {
  return $post('/admin/changePassword', data);
}
